package com.zhongyouyun.other.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;


@ApiModel(value = "MenuModel对象", description = "菜单")
@Data
@Accessors(chain = true)
public class LableModel implements Serializable, TreeModel<LableModel> {



    @ApiModelProperty(value = "名称")
    private String  lable;

    @ApiModelProperty(value = "值")
    private String  value;

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "父级Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pId;

    public void setpId(final Long pId) {
        this.pId = pId;
    }

    @ApiModelProperty(value = "子级")
    @TableField(exist = false)
    private List<LableModel> routes;


}
